<template>
    <div>
        <button @click="getText">添加一条土味情话</button>
        <ul v-for="item in loveStore.textList">
            <li>{{ item.text }}</li>
        </ul>
    </div>
</template>


<script lang="ts" setup name="Love">
import axios from "axios";
import { reactive } from "vue";
import { userLoveTalkList } from "@/store/LoveTalk";

const loveStore = userLoveTalkList();


async function getText() {
    // let { data: { content: text } } = await axios.get('https://api.uomg.com/api/rand.qinghua?format=json')

    // textList.push({ id: Math.random(), text: text })

}

</script>



<style scoped>
div {
    background-color: #28d470;
}

button {
    padding: 8px 16px;
    font-size: 16px;
    cursor: pointer;
    background-color: #8018b8;
    color: #fff;
    border: none;
    border-radius: 4px;
}

button:hover {
    background-color: #b30006;
}
</style>
